package cn.chrilwe.pigpig.core.model.user;

import cn.chrilwe.autocreatetable.start.annotation.Entity;
import cn.chrilwe.autocreatetable.start.annotation.mysql.AutoIncrement;
import cn.chrilwe.autocreatetable.start.annotation.mysql.Column;
import cn.chrilwe.autocreatetable.start.annotation.mysql.Notnull;
import cn.chrilwe.autocreatetable.start.annotation.mysql.Primary;
import cn.chrilwe.autocreatetable.start.annotation.mysql.Table;
import cn.chrilwe.autocreatetable.start.common.Engine;
import cn.chrilwe.autocreatetable.start.common.MysqlColumnType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 
 * @author chrilwe
 * 2020-7-30
 */
@Data
@Entity
@Table(charset = "utf8", engine = Engine.INNODB, name = "tb_role")
@ApiModel
public class Role {
	
	@Column(name = "role_id", length = 8, type = MysqlColumnType.INT)
	@Primary
	@AutoIncrement
	@Notnull
	@ApiModelProperty(name = "id", value = "角色id")
	private int id;
	
	@Column(name = "role_name", length = 15, type = MysqlColumnType.VARCHAR)
	@Notnull
	@ApiModelProperty(name = "name", value = "角色名称")
	private String name;
}
